//package com.atghost.common.config;
//
//import lombok.Getter;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.cors.CorsConfiguration;
//import org.springframework.web.cors.reactive.CorsWebFilter;
//import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
//
///**
// * @author Admin
// * @version 1.0
// * @date 2024-5-19 14:54
// **/
//@Configuration
//public class MinioCorsConfiguration {
//    @Bean
//    public CorsWebFilter corsWebFilter() {
//        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
//        CorsConfiguration corsConfiguration = new CorsConfiguration();
//        //配置跨域
//        //任意请求头
//        corsConfiguration.addAllowedHeader("*");
//        //任意请求方法
//        corsConfiguration.addAllowedMethod("*");
//        //运行请求来源跨域
//        corsConfiguration.addAllowedOrigin("*");
//        //允许携带cookie
//        corsConfiguration.setAllowCredentials(true);
//
//        source.registerCorsConfiguration("/**", corsConfiguration);
//        return new CorsWebFilter(source);
//    }
//
//
//}
